package cn.wj.school.common.enums;

import cn.wj.school.common.controller.StageController;
import javafx.application.Platform;

/**
 * @Author: yueding
 * @Description: ui Factory
 * @Date: Created in 16:51 2018/12/28
 * @Modified By: yueding Copyright(c) cai-inc.com
 */
public enum UiFactory {

    INSTANCE;

    private StageController stageController = new StageController();

    public StageController getStageController() {
        return stageController;
    }

    /**
     * 将任务转移给fxapplication线程延迟执行
     * 
     * @param task
     */
    public void runTaskInFxThread(Runnable task) {
        Platform.runLater(task);
    }
}
